<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class StoreWithdrawal extends Model
{
    public function setPriceAttribute($value)
    {
    	$this->attributes['price'] = (int)($value * 100);
    }
    
    public function getPriceAttribute($value)
    {
        return $value / 100;
    }
    
    public function applicant()
    {
    	return $this->belongsTo(AdminUser::class, 'applicant_id', 'id');
    }
    
    public function admin()
    {
    	return $this->belongsTo(AdminUser::class, 'admin_id', 'id');
    }
}
